package com.zzyl.mapper;

import com.zzyl.dto.ResourceDto;
import com.zzyl.entity.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ResourceMapper {
    List<Resource> selectList(Resource resource);

    void insert(Resource resource);
    @Select("select resource_no from sec_resource where parent_resource_no=#{parentResourceNo}")
    List<String> selectresourceNo(String parentResourceNo);

    void updateResource(ResourceDto resourceDto);
    @Update("update sec_resource set data_state=#{dataState} where resource_no = #{resourceNo} and parent_resource_no=#{parentResourceNo}")
    void dataStateupdate(Resource resource);
}
